	
var captainList = JSON.parse(localStorage.getItem("captainList"));
var captain = localStorage.getItem("captain");
console.log('captainList'+localStorage.getItem("captainList")); 
console.log('captain'+captain); 

function goimChat(){
	hui.open('../imChat.html',{},true);
}

hui.ready(function(){
	hui(".teamName").html(JSON.parse(captain).name);
	var options = ''; 
	for(var i = 0; i < captainList.length;i++){
		options += '<li>'
                +'<a href="javascript:void(0)">'
                    +'<div class="hui-media-list-img">'
                    	+'<img src="../../img/teamDoct.png" />'
                    +'</div>'
                    +'<div class="hui-media-content">'
                        +'<h1>'+captainList[i].name+'</h1>'
                        +'<p class="mainCommunity">'+captainList[i].content+'</p>'
                        +'<span>签约：<i>'+captainList[i].signeds+'</i></span>'
                    +'</div>'
                    +'<div class="hui-media-content-right" onclick="goimChat()">咨询</div>'
                +'</a>'
        	+'</li>'
	}
	hui('#allsign').html(options);
	
	//跳转聊天
	hui('#footSign').click(function(){
	    hui.open('../imChat.html');
	});
    hui.plusReady(function(){
    	console.log('plusReady')
    });
});